package api

import (
	"github.com/gin-gonic/gin"
	"life/api/handler"
	"life/consts"
	"life/pkg"
)

func Router(c *gin.Engine) {
	user := c.Group("/user")
	{
		user.POST("login", handler.Login)
	}

	video := c.Group("/video")
	{
		video.POST("/uploadFile", handler.UploadFile)

		video.Use(pkg.ParseJwtToken(consts.JWT_TOKEN_SECRET))

		video.POST("/addArticle", handler.AddCreate)
	}

}
